const express = require('express');
const router = express.Router();
const honorService = require('../service/user/honorService');
const honorManageService = require('../service/admin/honorManageService');
const {verifyToken, verifyAdminToken} = require('../middleware/auth')

/**
 * 用户入口API
 */
router.post('/get', verifyToken, honorService.getHonor)
router.post('/fight/get', verifyToken, honorService.getFight)


/**
 * 管理员入口API
 */
router.post('/admin/get', verifyAdminToken, honorService.getHonor)
router.post('/moment/update', verifyAdminToken, honorManageService.updateHonorMoment)
router.post('/introduction/update', verifyAdminToken, honorManageService.updateIntroduction)
router.post('/fight/admin/add', verifyAdminToken, honorManageService.addFight)
router.post('/fight/admin/get', verifyAdminToken, honorManageService.getFight)
router.post('/fight/admin/delete', verifyAdminToken, honorManageService.deleteFight)

module.exports = router;
